package lobby
{
	import flash.display.MovieClip;
	import flash.display.SimpleButton;
	import flash.text.TextField;
	import lobby.events.LobbyEvent;
	import flash.events.MouseEvent;
	import lobby.exchangeddata.HashTable;
	
	/**
	 * ...
	 * @author Bamboo
	 */
	public class GroupIconPanel extends MovieClip
	{
		public var showLog:SimpleButton;
		public var showCamera:SimpleButton;
		public var fullScreen:SimpleButton;
		public var msgLogTf:TextField;
		public var casinoViewTf:TextField;
		public var fullScreenTf:TextField;
		
		public function GroupIconPanel()
		{
			this.tabChildren = false;
			showLog.addEventListener(MouseEvent.CLICK, hldClick);
			showCamera.addEventListener(MouseEvent.CLICK, hldClick);
			fullScreen.addEventListener(MouseEvent.CLICK, hldClick);
			msgLogTf.mouseEnabled = false;
			casinoViewTf.mouseEnabled = false;
			fullScreenTf.mouseEnabled = false;
		}
		
		private function hldClick(e:MouseEvent):void
		{
			switch (e.currentTarget)
			{
				
				case showLog: 
					dispatchEvent(new LobbyEvent(LobbyEvent.CALL_SHOW_LOG, true));
					break;
				case showCamera: 
					dispatchEvent(new LobbyEvent(LobbyEvent.CALL_SHOW_CAMERA, true));
					break;
				case fullScreen: 
					dispatchEvent(new LobbyEvent(LobbyEvent.CALL_FULL_SCREEN, true));
					break;
			}
		
		}
		
		public function initText(hashTableInfo:HashTable):void
		{
			casinoViewTf.text = hashTableInfo.lookupString("casinoview");
			fullScreenTf.text = hashTableInfo.lookupString("FullScreen");
			msgLogTf.text = hashTableInfo.lookupString("MessLog");
		}
	}

}